import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL}/merchant/grouponGoods/index`,
		name: "获取拼团商品列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	add: {
		url: `${config.API_URL}/merchant/grouponGoods/add`,
		name: "新增拼团商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	edit: {
		url: `${config.API_URL}/merchant/grouponGoods/edit`,
		name: "编辑拼团商品",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	getEditInfo: {
		url: `${config.API_URL}/merchant/grouponGoods/edit`,
		name: "获取商品信息",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	del: {
		url: `${config.API_URL}/merchant/grouponGoods/del`,
		name: "删除拼团商品",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	orderList: {
		url: `${config.API_URL}/addons/groupon/admin.order/index`,
		name: "拼团订单列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	orderDetail: {
		url: `${config.API_URL}/addons/groupon/admin.order/detail`,
		name: "订单详情",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	shelf: {
		url: `${config.API_URL}/merchant/grouponGoods/shelf`,
		name: "上下架",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	}
}
